<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 4.01 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/pages/safeai/jsp/common/taglibs.jsp"%>

<html>
	<head>
		<title>Erp导入</title>
		<%@ include file="/pages/safeai/jsp/common/meta.jsp"%>
		<link href="${ctx}/css/safeai/together.css" rel="stylesheet" type="text/css">
	</head>
	<body>
		<br>
		<html:form action="erpImport.do?method=upload" method="post" enctype="multipart/form-data"> 
		<table width="50%" align="center">
			<tr>
				<td class="td_01">选择导入的文件：</td>
				<td class="td_04"><html:file property="erp.file"/></td>
			</tr>
			<tr><td colspan="2" align="center"><input type="submit" class="btn" value="导入" onclick="return check();"/></td></tr>
			<logic:notEmpty name="erpMsg">
			<tr align="center" >
				<td colspan="2"><span style="font-family:'宋体'; font-size:12px; color:#FF0000"><bean:write name="erpMsg"/></span></td>
			</tr>
			</logic:notEmpty> 
		</table>
		<br> 
		<table width="50%" align="center"> 
			<logic:present name="ready">
					 <tr align="left" >
						<td colspan="2">预处理结果:</td>
					 </tr>
				<logic:iterate id="str" name="ready">
					 <tr align="center" >
						<td colspan="2"><bean:write name="str"/></td>
					 </tr>
				</logic:iterate>
			</logic:present>
		</table>
		</html:form>
	</body>
</html>
<script language="javascript"> 
	function check(){ 
		var erpFile = document.getElementById("erp.file").value;
		
		if(erpFile == null || erpFile == ""){ 
			alert("请选择要导入的文件!");
			return false;
		}
		
		return true;
	} 
</script>